package com.pvdnc.tapkit.chat.chat.packet;

import com.pvdnc.encrypt.IEncrypt;
import com.pvdnc.nsocket.protocol.PacketCodec;
import com.pvdnc.nsocket.protocol.StreamInterpreter;
import com.pvdnc.nsocket.protocol.EnInterpreter;

public class InterpreterUtils {
    public static void addDefault(String command){
        PacketCodec.getInstance().addInterpreter(new StreamInterpreter(command));
    }

    public static void addCipher(String command, IEncrypt encrypt){
        EnInterpreter interpreter=new EnInterpreter(command,encrypt);
        PacketCodec.getInstance().addInterpreter(interpreter);
    }
}
